package org.lendoo.web.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.sql.Timestamp;
import java.sql.Blob;
import java.sql.Clob;

/**
 * 商品
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Goods", description = "商品")
@TableName("goods")
public class Goods {

    @ApiModelProperty(value = "主键", dataType = "Integer")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "category表的id", dataType = "Integer")
    @TableField(value = "category_id")
    private Integer categoryId;

    @ApiModelProperty(value = "goods_image表的id", dataType = "Integer")
    @TableField(value = "avatar_goods_image_id")
    private Integer avatarGoodsImageId;

    @ApiModelProperty(value = "是否是热门商品，1表示是热门商品，2表示否", dataType = "Integer")
    @TableField(value = "hot")
    private Integer hot;

    @ApiModelProperty(value = "名称", dataType = "String")
    @TableField(value = "title")
    private String title;

    @ApiModelProperty(value = "价格", dataType = "Double")
    @TableField(value = "price")
    private Double price;

    @ApiModelProperty(value = "已销售数量", dataType = "Integer")
    @TableField(value = "sold_amount")
    private Integer soldAmount;
}
